package com.changgou.pay.config;

import org.springframework.amqp.core.*;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RabbitMQConfig {

    public static final String ORDER_PAY="order_pay";

    /*//添加微信支付交换机
    public static final String PAYNOTIFY = "paynotify";*/

    @Bean(ORDER_PAY)
    public Queue queue(){
        return  new Queue(ORDER_PAY);
    }

    /*@Bean(PAYNOTIFY)
    public Exchange PAYNOTIFY(){
        return ExchangeBuilder.directExchange(PAYNOTIFY).durable(true).build();
    }*/

   /* @Bean
    public Binding BINDING_QUEUE_PAY(@Qualifier(ORDER_PAY) Queue queue,
                                     @Qualifier(PAYNOTIFY) Exchange exchange){
        return BindingBuilder.bind(queue).to(exchange).with("").noargs();
    }*/
}
